﻿<%@ Page Language="C#" MasterPageFile="~/admin/Admin.Master" AutoEventWireup="true" CodeBehind="ParentInfo.aspx.cs" Inherits="ESCHOOL.admin.WebForm10" Title="Parent Info" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        .style3
        {
            width: 88%;
        }
        .style4
        {
            width: 162px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <p>
        <br />
    </p>
    <asp:Panel ID="Panel1" runat="server" Width="622px">
        <table class="style3">
            <tr>
                <td class="style4">
                    &nbsp;</td>
                <td>
                    <asp:TextBox ID="tbparid" runat="server" Visible="False"></asp:TextBox>
                    <asp:TextBox ID="tbstudid" runat="server" Visible="False"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="style4">
                    Father Name</td>
                <td>
                    <asp:TextBox ID="tbfname" runat="server"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                        ControlToValidate="tbfname" ErrorMessage="Enter full name"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td class="style4">
                    Mother Name</td>
                <td>
                    <asp:TextBox ID="tbmname" runat="server"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                        ControlToValidate="tbmname" ErrorMessage="Enter full name"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td class="style4">
                    Father Qualification</td>
                <td>
                    <asp:TextBox ID="tbfquali" runat="server"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                        ControlToValidate="tbfquali" ErrorMessage="fill it"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td class="style4">
                    Mother Qualification</td>
                <td>
                    <asp:TextBox ID="tbmquali" runat="server"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" 
                        ControlToValidate="tbmquali" ErrorMessage="fill it"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td class="style4">
                    Father Occupation</td>
                <td>
                    <asp:TextBox ID="tbfoccu" runat="server"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" 
                        ControlToValidate="tbfoccu" ErrorMessage="fill it"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td class="style4">
                    Mother Occupation</td>
                <td>
                    <asp:TextBox ID="tbmoccu" runat="server"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" 
                        ControlToValidate="tbmoccu" ErrorMessage="fill it"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td class="style4">
                    Address</td>
                <td>
                    <asp:TextBox ID="tbaddress" runat="server"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" 
                        ControlToValidate="tbaddress" ErrorMessage="Enter full address"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td class="style4">
                    Phone No.</td>
                <td>
                    <asp:TextBox ID="tbpno" runat="server"></asp:TextBox>
                    <br />
                    <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                        ControlToValidate="tbpno" ErrorMessage="must be 10 digit,start with 0" 
                        ValidationExpression="(0\d{9})"></asp:RegularExpressionValidator>
                </td>
            </tr>
            <tr>
                <td class="style4">
                    Email id</td>
                <td>
                    <asp:TextBox ID="tbemail" runat="server"></asp:TextBox>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" 
                        ControlToValidate="tbemail" ErrorMessage="ex. abc@gmail.com" 
                        ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator>
                </td>
            </tr>
            <tr>
                <td class="style4">
                    User Type</td>
                <td>
                    <asp:DropDownList ID="DropDownList1" runat="server">
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td class="style4">
                    <asp:Label ID="lbuser" runat="server" Text="Username"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="tbusername" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="style4">
                    <asp:Label ID="lbpass" runat="server" Text="Password"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="tbpassword" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="style4">
                    &nbsp;</td>
                <td>
                    <asp:TextBox ID="tbques" runat="server" Visible="False"></asp:TextBox>
                    <asp:TextBox ID="tbanswer" runat="server" Visible="False"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="style4">
                    <asp:Button ID="btninsert" runat="server" onclick="btninsert_Click" 
                        Text="Insert" />
                </td>
                <td>
                    <asp:Button ID="btnupdate" runat="server" Text="Update" 
                        onclick="btnupdate_Click" />
                </td>
            </tr>
            <tr>
                <td class="style4">
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
        </table>
        <br />
    </asp:Panel>
    <p>
    </p>
    <p>
        <asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False" 
            Height="50px" Width="311px" onmodechanging="DetailsView1_ModeChanging" 
            onpageindexchanging="DetailsView1_PageIndexChanging">
            <Fields>
                <asp:BoundField DataField="father_name" HeaderText="Father Name" />
                <asp:BoundField DataField="mother_name" HeaderText="Mother Name" />
                <asp:BoundField DataField="father_qualification" 
                    HeaderText="Father Qualification" />
                <asp:BoundField DataField="mother_qualification" 
                    HeaderText="Mother Qualification" />
                <asp:BoundField DataField="father_occupation" HeaderText="Father Occupation" />
                <asp:BoundField DataField="mother_occupation" HeaderText="Mother Occupation" />
                <asp:BoundField DataField="permanent_address" HeaderText="Address" />
                <asp:BoundField DataField="phone_no" HeaderText="Phone No" />
                <asp:BoundField DataField="parent_emailid" HeaderText="Emailid" />
                <asp:BoundField DataField="username" HeaderText="Username" />
                <asp:BoundField DataField="password" HeaderText="Password" />
                <asp:BoundField DataField="security_question" HeaderText="Security Question" />
                <asp:BoundField DataField="answer" HeaderText="Answer" />
                <asp:TemplateField>
                    <ItemTemplate>
                        <asp:Button ID="btnedit" runat="server" 
                            CommandArgument='<%# Eval("parent_id") %>' CommandName="Edit" 
                            oncommand="btnedit_Command1" Text="Edit" CausesValidation="False" />
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <asp:Button ID="btndelete" runat="server" 
                            CommandArgument='<%# Eval("parent_id") %>' CommandName="Delete" 
                            oncommand="btndelete_Command1" Text="Delete" CausesValidation="False" />
                    </ItemTemplate>
                </asp:TemplateField>
            </Fields>
        </asp:DetailsView>
    </p>
    <p>
        &nbsp;</p>
    <p>
        &nbsp;</p>
    <p>
        &nbsp;</p>
    <p>
        &nbsp;</p>
    <p>
        &nbsp;</p>
    <p>
        &nbsp;</p>
    <p>
        &nbsp;</p>
    <p>
        &nbsp;</p>
    <p>
        &nbsp;</p>
    <p>
        &nbsp;</p>
    <p>
        &nbsp;</p>
    <p>
        &nbsp;</p>
    <p>
        &nbsp;</p>
    <p>
        &nbsp;</p>
    <p>
        &nbsp;</p>
    <p>
        &nbsp;</p>
    <p>
        &nbsp;</p>
    <p>
        &nbsp;</p>
    <p>
        &nbsp;</p>
    <p>
        &nbsp;</p>
    <p>
        &nbsp;</p>
    <p>
        &nbsp;</p>
    <p>
        &nbsp;</p>
    <p>
        &nbsp;</p>
    <p>
        &nbsp;</p>
    <p>
        &nbsp;</p>
    <p>
        &nbsp;</p>
    <p>
        &nbsp;</p>
    <p>
        &nbsp;</p>
    <p>
        &nbsp;</p>
    <p>
    </p>
</asp:Content>
